<%@page import="java.util.List,com.crm.entity.Parts,com.crm.entity.Clientdet" %>
	<%
	Clientdet clientdet =(Clientdet)request.getAttribute("client");
		String challanNo=request.getAttribute("challanNO").toString();
		String soNumber=request.getAttribute("soNumber").toString();
		String soDate=request.getAttribute("soDate").toString();
		System.out.println("challan No Is:"+challanNo);
		System.out.println("partsList Is:"+soNumber);
		System.out.println("soDate Is:"+soDate);
	%>

        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
              </tr>
			<tr>
                <td>&nbsp;</td>
                <td align="left" valign="top">Supply Order Number </td>
                <td align="left" valign="top"><input name="soNumber" type="text" class="form" value="<%=soNumber %>" /></td>
               <td align="left" valign="top">Challan Number </td>
                <td align="left" valign="top"><input name="challanNo" type="text" class="form" value="<%=challanNo %>" /></td>
              </tr>
              <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                
              </tr>
              <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td align="left" valign="top">SO Date </td>
                <td align="left" valign="top"><input name="soDate" type="text" id="soDate" class="form" value="<%=soDate %>" /></td>
              </tr>
              <tr>
                <td height="5"></td>
                <td height="5" align="left" valign="top"></td>
                <td height="5" align="left" valign="top"></td>
              </tr>
              </table>
          
	

	    <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB">
          <tr>
            <td width="23" height="30" align="left" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"  style="background-repeat:repeat-x">S.No</td>
            <td width="59" align="left" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Part No </td>
            <td width="257" align="left" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Description </td>
            <td width="302" align="left" valign="middle" background="<%=application.getContextPath() %>/images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Quantity </td>
          </tr>
          <%
          if(request.getAttribute("partsList")!=null){
          	List<Parts> lsp=(List<Parts>)request.getAttribute("partsList");
          	for(int i=0;i<lsp.size();i++){
          %>
          <tr>
            <td bgcolor="#FFFFFF"><input name="sno<%=i+1 %>" type="text" value="<%=i+1 %>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input type="hidden" value="<%=lsp.get(i).getPartid()%>" name="partId<%=i+1 %>"/><input name="partNumber<%=i+1 %>" type="text" value="<%=lsp.get(i).getPrtnum() %>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="desc<%=i+1 %>" type="text" value="<%=lsp.get(i).getDescription()%>" /></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><input name="qty<%=i+1 %>" type="text" value="<%=lsp.get(i).getQty() %>" /></td>
          </tr>
          <%}%>
          <input type="hidden" name="rowCount" value="<%=lsp.size() %>"/>
          <%} %>
        </table>
	 
	  <div class="box2">
	    <div class="buttton-main">
	    <input type="submit" class="button" value="Generate DC"/>
	   </div>
	  </div>
	   <script type="text/javascript">
	        $(function(){
 		 var client="<%=clientdet.getOrganisation()%>";
 		 var cldiv="<%=clientdet.getDivision()%>";
 		 var cluser="<%=request.getAttribute("user")%>";
 		 $("#enqclient").html("Client Name Is:<span class='cliendet'>"+client +
 		"</span>   &nbsp;&nbsp;&nbsp;&nbsp;  Client Division Is:<span class='cliendet'>"+cldiv+
 		 "</span>    &nbsp;&nbsp;&nbsp;&nbsp;    Client User Is:<span class='cliendet'>"+cluser+"</span>");
 		 $("#enqclient").show();
 	 });